﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="DailyPaid.aspx.cs" Inherits="BillingManagment.DailyPaid" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="Styles/Calender.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery.ui.core.js" type="text/javascript"></script>
    <script src="Scripts/jquery.ui.datepicker.js" type="text/javascript"></script>
    <script src="Scripts/jquery.ui.widget.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js" type="text/javascript"></script>
    <script type="text/javascript">
        function CalculateAmount() {
            var TOTAL = 0.00;
            //document.getElementById('txtAmount_1').value
            if ($('#txtCash').val()) {
                TOTAL = TOTAL + parseFloat($('#TOTAL').val());
            }
            if ($('#txtFraid').val()) {
                TOTAL = TOTAL + parseFloat($('#txtFraid').val());
            }

            if ($('#txtAdvance').val()) {
                TOTAL = TOTAL + parseFloat($('#txtAdvance').val());
            }
            if ($('#txtHydro').val()) {
                TOTAL = TOTAL + parseFloat($('#txtHydro').val());
            }
            if ($('#txtOther').val()) {
                TOTAL = TOTAL + parseFloat($('#txtOther').val());
            }

            $('#txtTotal').text(TOTAL);
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1 style="text-align: center">
        Daily Paid</h1>
    <table>
        <tr>
            <td>
                <asp:Label ID="lblFarmer" runat="server" Text="Select Farmer"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddlFarmer" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblDate" runat="server" Text="Date"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtStartDate" runat="server"></asp:TextBox>
                <%--<input type="text" name="txtStartDate" id="txtStartDate" />--%>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblCash" runat="server" Text="Cash"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtCash" onkeyup="CalculateAmount();" runat="server" OnTextChanged="txtCash_TextChanged"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblFraid" runat="server" Text="Fraid"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtFraid" onkeyup="CalculateAmount();" runat="server" OnTextChanged="txtFraid_TextChanged"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblAdvance" runat="server" Text="Advance"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtAdvance" runat="server" onkeyup="CalculateAmount();" OnTextChanged="txtAdvance_TextChanged"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblHydro" runat="server" Text="Hydro"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtHydro" runat="server" onkeyup="CalculateAmount();" OnTextChanged="txtHydro_TextChanged"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblOther" runat="server" Text="Other"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtOther" onkeyup="CalculateAmount();" runat="server" OnTextChanged="txtOther_TextChanged"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblTotal" runat="server" Text="Total"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtTotal" runat="server" ReadOnly="true"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" />
            </td>
            <td>
                <asp:Button ID="btnCancel" runat="server" Text="Cancel" />
            </td>
        </tr>
    </table>
    <script type="text/javascript">
        $(function () {
            $("#ContentPlaceHolder1_txtStartDate").datepicker({ dateFormat: 'dd-mm-yy' }).val();


        });
    </script>
</asp:Content>
